# coding: utf-8

"""
    SnapTrade

    Connect brokerage accounts to your app for live positions and trading

    The version of the OpenAPI document: 1.0.0
    Contact: api@snaptrade.com
    Created by: https://snaptrade.com/
"""

from datetime import date, datetime  # noqa: F401
import decimal  # noqa: F401
import functools  # noqa: F401
import io  # noqa: F401
import re  # noqa: F401
import typing  # noqa: F401
import typing_extensions  # noqa: F401
import uuid  # noqa: F401

import frozendict  # noqa: F401

from snaptrade_client import schemas  # noqa: F401


class PerformanceCustom(
    schemas.DictSchema
):
    """
    This class is auto generated by Konfig (https://konfigthis.com)

    Performance Custom Response Object
    """


    class MetaOapg:
        
        class properties:
            
            
            class totalEquityTimeframe(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['PastValue']:
                        return PastValue
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['PastValue'], typing.List['PastValue']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'totalEquityTimeframe':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'PastValue':
                    return super().__getitem__(i)
        
            @staticmethod
            def contributions() -> typing.Type['NetContributions']:
                return NetContributions
            
            
            class contributionTimeframe(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['PastValue']:
                        return PastValue
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['PastValue'], typing.List['PastValue']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'contributionTimeframe':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'PastValue':
                    return super().__getitem__(i)
            
            
            class contributionTimeframeCumulative(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['PastValue']:
                        return PastValue
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['PastValue'], typing.List['PastValue']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'contributionTimeframeCumulative':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'PastValue':
                    return super().__getitem__(i)
            
            
            class withdrawalTimeframe(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['PastValue']:
                        return PastValue
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['PastValue'], typing.List['PastValue']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'withdrawalTimeframe':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'PastValue':
                    return super().__getitem__(i)
            
            
            class contributionStreak(
                schemas.NumberBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneDecimalMixin
            ):
            
            
                def __new__(
                    cls,
                    *args: typing.Union[None, decimal.Decimal, int, float, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'contributionStreak':
                    return super().__new__(
                        cls,
                        *args,
                        _configuration=_configuration,
                    )
            
            
            class contributionMonthsContributed(
                schemas.NumberBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneDecimalMixin
            ):
            
            
                def __new__(
                    cls,
                    *args: typing.Union[None, decimal.Decimal, int, float, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'contributionMonthsContributed':
                    return super().__new__(
                        cls,
                        *args,
                        _configuration=_configuration,
                    )
            
            
            class contributionTotalMonths(
                schemas.NumberBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneDecimalMixin
            ):
            
            
                def __new__(
                    cls,
                    *args: typing.Union[None, decimal.Decimal, int, float, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'contributionTotalMonths':
                    return super().__new__(
                        cls,
                        *args,
                        _configuration=_configuration,
                    )
            
            
            class dividends(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['NetDividend']:
                        return NetDividend
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['NetDividend'], typing.List['NetDividend']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'dividends':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'NetDividend':
                    return super().__getitem__(i)
            
            
            class dividendIncome(
                schemas.NumberBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneDecimalMixin
            ):
            
            
                def __new__(
                    cls,
                    *args: typing.Union[None, decimal.Decimal, int, float, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'dividendIncome':
                    return super().__new__(
                        cls,
                        *args,
                        _configuration=_configuration,
                    )
            
            
            class monthlyDividends(
                schemas.NumberBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneDecimalMixin
            ):
            
            
                def __new__(
                    cls,
                    *args: typing.Union[None, decimal.Decimal, int, float, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'monthlyDividends':
                    return super().__new__(
                        cls,
                        *args,
                        _configuration=_configuration,
                    )
        
            @staticmethod
            def badTickers() -> typing.Type['PerformanceCustomBadTickers']:
                return PerformanceCustomBadTickers
            
            
            class dividendTimeline(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['MonthlyDividends']:
                        return MonthlyDividends
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['MonthlyDividends'], typing.List['MonthlyDividends']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'dividendTimeline':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'MonthlyDividends':
                    return super().__getitem__(i)
            
            
            class commissions(
                schemas.NumberBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneDecimalMixin
            ):
            
            
                def __new__(
                    cls,
                    *args: typing.Union[None, decimal.Decimal, int, float, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'commissions':
                    return super().__new__(
                        cls,
                        *args,
                        _configuration=_configuration,
                    )
            
            
            class forexFees(
                schemas.NumberBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneDecimalMixin
            ):
            
            
                def __new__(
                    cls,
                    *args: typing.Union[None, decimal.Decimal, int, float, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'forexFees':
                    return super().__new__(
                        cls,
                        *args,
                        _configuration=_configuration,
                    )
            
            
            class fees(
                schemas.NumberBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneDecimalMixin
            ):
            
            
                def __new__(
                    cls,
                    *args: typing.Union[None, decimal.Decimal, int, float, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'fees':
                    return super().__new__(
                        cls,
                        *args,
                        _configuration=_configuration,
                    )
            
            
            class rateOfReturn(
                schemas.NumberBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneDecimalMixin
            ):
            
            
                def __new__(
                    cls,
                    *args: typing.Union[None, decimal.Decimal, int, float, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'rateOfReturn':
                    return super().__new__(
                        cls,
                        *args,
                        _configuration=_configuration,
                    )
            
            
            class returnRateTimeframe(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['SubPeriodReturnRate']:
                        return SubPeriodReturnRate
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['SubPeriodReturnRate'], typing.List['SubPeriodReturnRate']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'returnRateTimeframe':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'SubPeriodReturnRate':
                    return super().__getitem__(i)
            detailedMode = schemas.BoolSchema
            __annotations__ = {
                "totalEquityTimeframe": totalEquityTimeframe,
                "contributions": contributions,
                "contributionTimeframe": contributionTimeframe,
                "contributionTimeframeCumulative": contributionTimeframeCumulative,
                "withdrawalTimeframe": withdrawalTimeframe,
                "contributionStreak": contributionStreak,
                "contributionMonthsContributed": contributionMonthsContributed,
                "contributionTotalMonths": contributionTotalMonths,
                "dividends": dividends,
                "dividendIncome": dividendIncome,
                "monthlyDividends": monthlyDividends,
                "badTickers": badTickers,
                "dividendTimeline": dividendTimeline,
                "commissions": commissions,
                "forexFees": forexFees,
                "fees": fees,
                "rateOfReturn": rateOfReturn,
                "returnRateTimeframe": returnRateTimeframe,
                "detailedMode": detailedMode,
            }
        additional_properties = schemas.AnyTypeSchema
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["totalEquityTimeframe"]) -> MetaOapg.properties.totalEquityTimeframe: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["contributions"]) -> 'NetContributions': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["contributionTimeframe"]) -> MetaOapg.properties.contributionTimeframe: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["contributionTimeframeCumulative"]) -> MetaOapg.properties.contributionTimeframeCumulative: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["withdrawalTimeframe"]) -> MetaOapg.properties.withdrawalTimeframe: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["contributionStreak"]) -> MetaOapg.properties.contributionStreak: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["contributionMonthsContributed"]) -> MetaOapg.properties.contributionMonthsContributed: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["contributionTotalMonths"]) -> MetaOapg.properties.contributionTotalMonths: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["dividends"]) -> MetaOapg.properties.dividends: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["dividendIncome"]) -> MetaOapg.properties.dividendIncome: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["monthlyDividends"]) -> MetaOapg.properties.monthlyDividends: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["badTickers"]) -> 'PerformanceCustomBadTickers': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["dividendTimeline"]) -> MetaOapg.properties.dividendTimeline: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["commissions"]) -> MetaOapg.properties.commissions: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["forexFees"]) -> MetaOapg.properties.forexFees: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["fees"]) -> MetaOapg.properties.fees: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["rateOfReturn"]) -> MetaOapg.properties.rateOfReturn: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["returnRateTimeframe"]) -> MetaOapg.properties.returnRateTimeframe: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["detailedMode"]) -> MetaOapg.properties.detailedMode: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["totalEquityTimeframe"], typing_extensions.Literal["contributions"], typing_extensions.Literal["contributionTimeframe"], typing_extensions.Literal["contributionTimeframeCumulative"], typing_extensions.Literal["withdrawalTimeframe"], typing_extensions.Literal["contributionStreak"], typing_extensions.Literal["contributionMonthsContributed"], typing_extensions.Literal["contributionTotalMonths"], typing_extensions.Literal["dividends"], typing_extensions.Literal["dividendIncome"], typing_extensions.Literal["monthlyDividends"], typing_extensions.Literal["badTickers"], typing_extensions.Literal["dividendTimeline"], typing_extensions.Literal["commissions"], typing_extensions.Literal["forexFees"], typing_extensions.Literal["fees"], typing_extensions.Literal["rateOfReturn"], typing_extensions.Literal["returnRateTimeframe"], typing_extensions.Literal["detailedMode"], str, ]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["totalEquityTimeframe"]) -> typing.Union[MetaOapg.properties.totalEquityTimeframe, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["contributions"]) -> typing.Union['NetContributions', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["contributionTimeframe"]) -> typing.Union[MetaOapg.properties.contributionTimeframe, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["contributionTimeframeCumulative"]) -> typing.Union[MetaOapg.properties.contributionTimeframeCumulative, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["withdrawalTimeframe"]) -> typing.Union[MetaOapg.properties.withdrawalTimeframe, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["contributionStreak"]) -> typing.Union[MetaOapg.properties.contributionStreak, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["contributionMonthsContributed"]) -> typing.Union[MetaOapg.properties.contributionMonthsContributed, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["contributionTotalMonths"]) -> typing.Union[MetaOapg.properties.contributionTotalMonths, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["dividends"]) -> typing.Union[MetaOapg.properties.dividends, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["dividendIncome"]) -> typing.Union[MetaOapg.properties.dividendIncome, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["monthlyDividends"]) -> typing.Union[MetaOapg.properties.monthlyDividends, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["badTickers"]) -> typing.Union['PerformanceCustomBadTickers', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["dividendTimeline"]) -> typing.Union[MetaOapg.properties.dividendTimeline, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["commissions"]) -> typing.Union[MetaOapg.properties.commissions, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["forexFees"]) -> typing.Union[MetaOapg.properties.forexFees, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["fees"]) -> typing.Union[MetaOapg.properties.fees, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["rateOfReturn"]) -> typing.Union[MetaOapg.properties.rateOfReturn, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["returnRateTimeframe"]) -> typing.Union[MetaOapg.properties.returnRateTimeframe, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["detailedMode"]) -> typing.Union[MetaOapg.properties.detailedMode, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ...
    
    def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["totalEquityTimeframe"], typing_extensions.Literal["contributions"], typing_extensions.Literal["contributionTimeframe"], typing_extensions.Literal["contributionTimeframeCumulative"], typing_extensions.Literal["withdrawalTimeframe"], typing_extensions.Literal["contributionStreak"], typing_extensions.Literal["contributionMonthsContributed"], typing_extensions.Literal["contributionTotalMonths"], typing_extensions.Literal["dividends"], typing_extensions.Literal["dividendIncome"], typing_extensions.Literal["monthlyDividends"], typing_extensions.Literal["badTickers"], typing_extensions.Literal["dividendTimeline"], typing_extensions.Literal["commissions"], typing_extensions.Literal["forexFees"], typing_extensions.Literal["fees"], typing_extensions.Literal["rateOfReturn"], typing_extensions.Literal["returnRateTimeframe"], typing_extensions.Literal["detailedMode"], str, ]):
        return super().get_item_oapg(name)

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        totalEquityTimeframe: typing.Union[MetaOapg.properties.totalEquityTimeframe, list, tuple, schemas.Unset] = schemas.unset,
        contributions: typing.Union['NetContributions', schemas.Unset] = schemas.unset,
        contributionTimeframe: typing.Union[MetaOapg.properties.contributionTimeframe, list, tuple, schemas.Unset] = schemas.unset,
        contributionTimeframeCumulative: typing.Union[MetaOapg.properties.contributionTimeframeCumulative, list, tuple, schemas.Unset] = schemas.unset,
        withdrawalTimeframe: typing.Union[MetaOapg.properties.withdrawalTimeframe, list, tuple, schemas.Unset] = schemas.unset,
        contributionStreak: typing.Union[MetaOapg.properties.contributionStreak, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset,
        contributionMonthsContributed: typing.Union[MetaOapg.properties.contributionMonthsContributed, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset,
        contributionTotalMonths: typing.Union[MetaOapg.properties.contributionTotalMonths, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset,
        dividends: typing.Union[MetaOapg.properties.dividends, list, tuple, schemas.Unset] = schemas.unset,
        dividendIncome: typing.Union[MetaOapg.properties.dividendIncome, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset,
        monthlyDividends: typing.Union[MetaOapg.properties.monthlyDividends, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset,
        badTickers: typing.Union['PerformanceCustomBadTickers', schemas.Unset] = schemas.unset,
        dividendTimeline: typing.Union[MetaOapg.properties.dividendTimeline, list, tuple, schemas.Unset] = schemas.unset,
        commissions: typing.Union[MetaOapg.properties.commissions, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset,
        forexFees: typing.Union[MetaOapg.properties.forexFees, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset,
        fees: typing.Union[MetaOapg.properties.fees, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset,
        rateOfReturn: typing.Union[MetaOapg.properties.rateOfReturn, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset,
        returnRateTimeframe: typing.Union[MetaOapg.properties.returnRateTimeframe, list, tuple, schemas.Unset] = schemas.unset,
        detailedMode: typing.Union[MetaOapg.properties.detailedMode, bool, schemas.Unset] = schemas.unset,
        _configuration: typing.Optional[schemas.Configuration] = None,
        **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ],
    ) -> 'PerformanceCustom':
        return super().__new__(
            cls,
            *args,
            totalEquityTimeframe=totalEquityTimeframe,
            contributions=contributions,
            contributionTimeframe=contributionTimeframe,
            contributionTimeframeCumulative=contributionTimeframeCumulative,
            withdrawalTimeframe=withdrawalTimeframe,
            contributionStreak=contributionStreak,
            contributionMonthsContributed=contributionMonthsContributed,
            contributionTotalMonths=contributionTotalMonths,
            dividends=dividends,
            dividendIncome=dividendIncome,
            monthlyDividends=monthlyDividends,
            badTickers=badTickers,
            dividendTimeline=dividendTimeline,
            commissions=commissions,
            forexFees=forexFees,
            fees=fees,
            rateOfReturn=rateOfReturn,
            returnRateTimeframe=returnRateTimeframe,
            detailedMode=detailedMode,
            _configuration=_configuration,
            **kwargs,
        )

from snaptrade_client.model.monthly_dividends import MonthlyDividends
from snaptrade_client.model.net_contributions import NetContributions
from snaptrade_client.model.net_dividend import NetDividend
from snaptrade_client.model.past_value import PastValue
from snaptrade_client.model.performance_custom_bad_tickers import PerformanceCustomBadTickers
from snaptrade_client.model.sub_period_return_rate import SubPeriodReturnRate
